﻿using System.Web.Mvc;
using FikriKibar.Common.Entities;
using FikriKibar.UI.WebCommon.Infrastructure;

namespace FikriKibar.UI.WebManagement.Controllers
{
    public class RedirectionController : FikriKibarController
    {
        #region Methods
        public ViewResult Redirect()
        {

            var redirectionModel=(RedirectionModel) TempData["RedirectionModel"];
            return View(redirectionModel);
        }

        public ActionResult RedirectAction(string url, string message, int timeout, string cssClass)
        {
            TempData["RedirectionModel"] = new RedirectionModel
            {
                Url = url,
                Message = message,
                Timeout = timeout,
                CssClass = cssClass
            };

            return RedirectToAction("Redirect", "Redirection");
        }
        #endregion
    }
}